package edu.hziee.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import edu.hziee.mapper.StudentMapper;
import edu.hziee.models.Student;


@Repository
public class StudentDao {

	@Autowired
	StudentMapper studentmapper;
	
	public List<Student> findAll(){
		return studentmapper.findAll();
	}
	
	public Student findById(int id){
		return studentmapper.findById(id);
	}
	
	public void addStudent(Student student){
		studentmapper.addStudent(student);
	}
	
	public void modify(Student student){
		studentmapper.modify(student);
	}
	
	public void delete(int id){
		studentmapper.delete(id);
	}
}
